<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <xxx v-model="msg"></xxx>
    </div>
    <script src="./js/vue.js"></script>
    <script>
         Vue.component('xxx',{
        props:{
            value:{
                type: String,
                required: true
            }
        },
        data:()=> {
            return {
                car:[]
            }
        },
        template:`<div>
                    <span>{{value}}</span>
                    <button @click="$emit('input','嘻嘻')">修改</button>
                 </div>`
    })
        var vm = new Vue({
            el: '#app',
            data: {
                msg:'0000202'
            }
            });
    </script>
</body>
</html>